<template>
  <div>
    <el-button @click="openModal">打开弹窗</el-button>
    <el-button @click="openModal2">打开弹窗</el-button>
    <Dialog ref="dialogRef"/>
    <Dialog2 ref="dialog2Ref"/>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import Dialog from './Dialog.vue'
import Dialog2 from './Dialog2.vue'

const dialogRef = ref()
const dialog2Ref = ref()
const openModal = () => {
  dialogRef.value.openModal('1111')
}
const openModal2 = () => {
  dialog2Ref.value.openModal('aaaa')
}
</script>

<style scoped>

</style>